#include <iostream>
#include "ModObserver.h"

using std::cout;

ModObserver::ModObserver(Subject* model, int val)
{
    model->attach(this);
    m_nMod = val;
}

void ModObserver::update(int val)
{
    cout << val << " mod " << m_nMod << " is " << val % m_nMod << '\n';
}
